<?php
include("html/function.php");
init_connect_db();
$password = sha1($_POST['password']);
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$firstname = $_POST['firstname'];
$dob = $_POST['dob'].' 00:00:00';
$dateCreate = date("Y-m-d H:i:s");
$temp = "INSERT INTO Users (id, lastName, firstName, email, password, admin, dateOfBirth, dateCreate) VALUES (NULL, '$lastname', '$firstname', '$email', '$password',  0, '$dob','$dateCreate')";
$query = mysql_query($temp);
if (!$query){
	printf('Could not execut the query');
	exit();
}
  header('Location: ' . $_SERVER['HTTP_REFERER']);
?>